The present invention relates to a magnetic field sensor, method for detecting magnetic field and device for detecting magnetic field, capable of detecting the strength of a magnetic field without relying to the polarity of the magnetic field.
In recent years, demands for a magnetic field sensor as a position sensor such as open/close detection device or a rotation detection device which are mounted on a miniature electronic machine such as a folding-type cellular phone, a notebook personal computer and a digital still camera are rising. In regard to a magnetic field sensor which is to be mounted on a portable miniature electronic machine, its circuit scale and electric current consumption needs to be both reduced.
Generally, a magnetic sensor is monolithically integrated and configured by using a bipolar transistor, a CMOS device or the like. Such magnetic sensor has a magnetoelectric element which generates a voltage in proportion to a magnetic field or a magnetic flux density, an amplifier which amplifies the output signal of a magnetoelectric element, and a comparator which compares the output voltage of the amplifier with the pre-determined reference voltage, and outputs the judgment result of whether the strength of the magnetic field detected by the magnetoelectric element (Hereinafter described as xe2x80x9cdetected magnetic fieldxe2x80x9d) is larger or not compared with the pre-determined strength of the magnetic field. A Hall element which outputs a voltage corresponding to the magnetic field strength or the magnetic flux density which passes through the element, or a magnetic resistance whose resistance value varies according to the strength of the magnetic field is used as a magnetoelectric element.
In order to obtain an accurate comparison result according to the strength of the magnetic field from the magnetic field sensor, there is a need to control the offset signal contained in the signal outputted from the amplifier, and to minimize the dispersion of the signal outputted from the amplifier for each magnetic field sensor (product). There are two major factors for an offset signal to occur. One factor is an offset signal component of a magnetoelectric element due to the effect of a stress of a sealing package or the like, and the other is an input offset signal component of an amplifier.
Method for compensating the offset signal component of a magnetoelectric element is disclosed in the specification of U.S. Pat. No. 4,037,150. More specifically, of the output terminals of the magnetoelectric element having four terminals which are geometrically equal, voltage differences of the two pairs of output terminals located in a diagonal position are outputted, wherein the first phase and the second phase of the synchronizing signal which acts as a trigger for detection is alternately switched, and a sum of the output values is obtained. The effective signal component is doubled since it is in a same phase, and the offset signal component is cancelled since it is in an opposite phase.
One of the factors to determine superiority of a magnetic field sensor is whether a detection of a magnetic field is capable or not, regardless of the polarity of the magnet incorporated to a product, or in other words, corresponding to the magnetic field of both polarities. If a judgment of a magnetic field strength is capable regardless of the polarity of the magnet, controlling the direction of a magnet when placing a magnet in a position sensor or the like incorporating a magnet and a Hall IC, becomes unnecessary.
Hereinafter, a conventional magnetic field sensor judging the magnetic field strength of both polarities disclosed in the Official Gazette of Japanese Unexamined Patent Publication Hei 7-83699 is described in reference to the drawings.
FIG. 4 shows a configuration example of a conventional magnetic field strength judgment circuit of both polarities. As shown in FIG. 4, a conventional magnetic field sensor is comprised of a magnetoelectric element (xe2x80x9cHall elementxe2x80x9d in prior art) 101, a voltage amplifier 102 which amplifies the output voltage of the magnetoelectric element 101, a first Schmitt trigger circuit 103A which receives the output voltage from the voltage-amplifier 102 and outputs a different voltage depending on its threshold value, a second Schmitt trigger circuit 103B which receives the output voltage from the voltage amplifier, inverting the polarity of the input signal of the first Schmitt trigger circuit 103A, and a logic latch circuit 104 which receives and latches the output signal from the first Schmitt trigger circuit 103A and the second Schmitt trigger circuit 103B.
Operation of a conventional magnetic field sensor which is configured as such is described.
First, a Hall voltage which occurs at the output terminal of the magnetoelectric element 101 in proportion to the magnetic flux density passing through the magnetoelectric element 101 is amplified by the amplifier 102, and an amplified voltage VH is obtained.
Next, the first Schmitt trigger circuit 103A and the second Schmitt trigger circuit 103B input the amplified voltage VH, compares whether the value of the amplified voltage VH is larger or not than the set voltage value, and outputs the judgment value. The first Schmitt trigger circuit 103A and the second Schmitt trigger circuit 103B is an equivalent circuit, and by mutually inverting the polarity of the input signal, level detection of the magnetic field strength of the north polarity and the south polarity are performed separately in these two Schmitt trigger circuits 103A and 103B.
Then, the output value of the first Schmitt trigger circuit 103A and the second Schmitt trigger circuit 103B are inputted to the logic latch circuit 104. Subsequently, an output value is outputted from the logic latch circuit 104, wherein a certain computation is performed to the output value of the two Schmitt trigger circuits 103A and 103B corresponding to magnetic fields of the north polarity and the south polarity respectively. The output value from the logic latch circuit 104 is a binary value irrelevance to polarity of the detected magnetic field representing whether or not the strength of the detected magnetic field is larger than the strength of the set magnetic field.
However, a conventional magnetic field sensor has a difficulty wherein reducing both the circuit scale and electric current consumption is difficult, since two sets of Schmitt trigger circuit are needed as a voltage comparator circuit in order to detect a magnetic field strength regardless of the polarity of the magnetic field and corresponding to the magnetic field of both polarities.
The present invention has the purpose of providing a magnetic field sensor, a device for detecting magnetic field and a method for detecting magnetic field which solves the above-mentioned conventional problem, detecting a magnetic field strength of both polarities regardless of the polarity of the magnetic field with a simple configuration and consumes a small amount of power.
In order to solve the above-mentioned difficulties, the present invention has the following configuration. A magnetic field sensor in accordance with the present invention from one aspect is comprised of a first switch part which receives a signal corresponding to a signal of a magnetoelectric element in an applied magnetic field, and which outputs an output signal so that a polarity of the output signal in a first period and a fourth period are each opposite to a polarity of the output signal in a second period and a third period, an amplifier which amplifies the output signal of the first switch part and outputs an output signal to its output terminal pair, a first memory element of which both ends are connected to the above-mentioned output terminal pair of the amplifier, a second switch part connected between one of the above-mentioned output terminal pair and one terminal of the above-mentioned first memory element, and which closes in synchronization to the above-mentioned first period and the above-mentioned third period and opens in synchronization to the above-mentioned second period and the above-mentioned fourth period, and an output switch terminal which outputs a signal of a first polarity in the second period, and which outputs a signal of an opposite polarity to the above-mentioned first polarity in the fourth period.
A magnetic field sensor in accordance with the present invention from another aspect is comprised of a magnetoelectric element which has a first terminal pair and a second terminal pair and which outputs a signal corresponding to an applied magnetic field, a first switch part which receives a signal of the first terminal pair and a signal of the second terminal pair of the magnetoelectric element and at least one external signal which determines a first period., a second period, a third period and a fourth period, and which outputs a signal of said first terminal pair of the magnetoelectric element in the first period and the fourth period, and outputs a signal of said second terminal pair of the magnetoelectric element in the second period and the third period, an amplifier which amplifies the output signal of the first switch part and outputs a signal to its output terminal pair, a first memory element of which both ends are connected to the above-mentioned output terminal pair of the amplifier, a second switch part connected between one of the above-mentioned output terminal pair and one terminal of the above-mentioned first memory element, and which closes in synchronization to the first period and the third period and opens in synchronization to the second period and to the fourth period, and an output switch terminal which-outputs at least one of the signals at the ends of the above-mentioned second switch part.
In this specification, the first period, the second period, the third period and the fourth period occur singly or repeatedly in this sequence.
A device for detecting magnetic field sensor in accordance with the present invention from another aspect is comprised of a first selecting-signal generator which generates a first selecting-signal during a first period and a fourth period, a second selecting-signal generator which generates a second selecting-signal during a second period and a third period, a third selecting-signal generator which generates a third selecting-signal during the first period and the third period, a magnetoelectric element which has a first terminal pair and a second terminal pair and which outputs a signal corresponding to an applied magnetic field, a first switch part which receives a signal of the first terminal pair and a signal of the second terminal pair of the magnetoelectric element, and said first selecting-signal and said second selecting-signal respectively, and which outputs a signal of said first terminal pair of the magnetoelectric element in the first period and the fourth period, and outputs a signal of said second terminal pair of the magnetoelectric element in the second period and the third period, an amplifier which amplifies the output signal of the first switch part and outputs a signal to its output terminal pair, a first memory element, both ends of which are connected to the above-mentioned output terminal pair of the amplifier, a second switch part connected between one of the above-mentioned output terminal pair and one terminal of the above-mentioned first memory element, and which receives the above-mentioned third selecting signal, and which closes in the first period and the third period and opens in the second period and the fourth period, a comparator which receives at least one of the voltages at the ends of the above-mentioned second switch part, and which outputs a result of comparison with a predetermined value, and a judgment circuit which outputs a logical sum signal of the output signal of the above-mentioned comparator in the second period and the output signal of the above-mentioned comparator in the fourth period.
A method for detecting magnetic field sensor in accordance with the present invention from one aspect is comprised of a step of receiving a signal corresponding to an applied magnetic field, outputted from a magnetoelectric element, and outputting an output signal so that a polarity of the output signal in a first period and a fourth period opposites to a polarity of the signal during a second period and a third period, an amplifying step of amplifying and outputting the output signal, a holding step of holding the output signal outputted in the above-mentioned amplifying step in a first memory element, in the first period and the third period, an addition step of adding-signal components of an output signal outputted in the above-mentioned amplifying step and the output signal stored in the above-mentioned first memory element, in the second period and the fourth period, a comparison step of receiving the added signal components of the above-mentioned addition step in the second period and the fourth period, and outputting a result of comparison with a predetermined value, and a judgment step of outputting a logical sum of the output signal of the above-mentioned comparison step in the second period and the period.
By having such configuration, the present invention is capable of removing the offset voltage contingent to the amplifier and extracting the output signal of the magnetoelectric element, as well as removing an offset voltage component which occurs at the output of a magnetoelectric element, using the structural symmetry of a magnetoelectric element.
Existence of a signal can be judged whether the polarity of the magnetic field is a north pole or a south pole.
In the above-mentioned magnetic sensor in accordance with the present invention from another aspect, the above-mentioned second switch part comprises an output terminal pair.
A magnetic field sensor in accordance with the present invention from another aspect further comprises a comparator, which receives the signal of said output switch terminal, and outputs a result of comparison with a predetermined value. By having a comparator which inputs the signal of a switch output terminal and outputs the result compared with the predetermined value, the magnetic field sensor outputs a highly precise binary value.
In the above-mentioned magnetic sensor in accordance with the present invention from another aspect, a different voltage is appended to the signal of said output switch terminal, corresponding to the output signal of said comparator. From this configuration, a hysteresis can be provided to the comparator, and magnetic field or a magnetic flux density can be detected with stability.
Furthermore, in the above-mentioned magnetic sensor in accordance with the present invention from another aspect, one end of said second switch part is connected to one of the input terminal pair of the comparator, and the other end of said second switch part is connected to the other said input terminal pair of the comparator via a second memory element. A threshold value can be stored in the second memory element, and a threshold can be set in the comparator in a simple configuration.
The above-mentioned magnetic sensor in accordance with the present invention from another aspect further comprises a third switch part, one end of which is connected to one end of said second memory element, a fourth switch part, one end of which is connected to the other end of said second memory element, a first voltage source which applies a first voltage to the other end of said third switch part, and a second voltage source which applies a voltage different from said first voltage to the other end of said fourth switch part, wherein said third switch part and the fourth switch part are closed in said first and fourth period. Thus a threshold value can be stored in the second memory element, and a threshold can be set in the comparator in a simple configuration.
In the above-mentioned magnetic sensor in accordance with the present invention from another aspect, either one of said first voltage or said second voltage is changed corresponding to said external signal. By appending a different voltage corresponding to the output signal of the comparator to the signal of the switch output terminal, the magnetic field sensor is capable of detection in which a hysteresis is appended.
In the above-mentioned magnetic sensor in accordance with the present invention from another aspect, the above-mentioned first memory element is a capacitor.
In the above-mentioned magnetic sensor in accordance with the present invention from another aspect, the above-mentioned second memory element is a capacitor.
By using a capacitor as a memory element, a magnetic field sensor which is compact and suitable for integration can be achieved.
The above-mentioned magnetic sensor in accordance with the present invention from another aspect further comprises a judgment circuit which receives a signal of said output switch terminal and outputs a signal of judgment result of the signal value of the second period and the fourth period.
In the above-mentioned magnetic sensor in accordance with the present invention from another aspect, the above-mentioned judgment circuit comprises a first flip-flop circuit which receives the signal of said comparator output terminal at its D input terminal and receives a first clock signal at its clock input terminal, and which holds the signal in said second period and outputs the signal to its Q output terminal, a NOR logic circuit which receives the output signal of said comparator terminal and the output signal of the Q output terminal of said first flip-flop circuit at its input terminal pair respectively and outputs an NOR logic output, and a second flip-flop circuit which receives an output of said NOR logic circuit at its D input terminal and receives a second clock signal at its clock input terminal, and which holds the signal in said fourth period and outputs the signal to its output terminal, wherein the above-mentioned judgment circuit outputs a signal from the second flip-flop circuit output terminal.
In the above-mentioned magnetic sensor in accordance with the present invention from another aspect, the above-mentioned judgment circuit comprises a first flip-flop circuit which receives the signal of said comparator output terminal at its D input terminal and receives a first clock signal at its clock input terminal, and which holds the signal in said second period and outputs the signal to its Q output terminal, a second flip-flop circuit which receives the signal of said comparator output terminal at its D input terminal and receives a second clock signal at its clock input terminal, and which holds the signal in said fourth period and outputs the signal to its output terminal, and a NOR logic circuit which receives the Q outputs of said first flip-flop circuit and said second flip-flop circuit at its input terminal pair respectively and outputs a NOR logic output, wherein the above-mentioned judgment circuit outputs the NOR logic output.
By comprising a judgment circuit which inputs the signal of the switch output signal, and which outputs the signal which judged the signal value of the second period and the fourth period of the signal applied from the outside, existence of a signal can be judged whether the polarity of the magnetic field is a north pole or a south pole.
In the above-mentioned magnetic sensor in accordance with the present invention from another aspect, the above-mentioned first switch part comprises a first voltage terminal which outputs a first voltage, a second voltage terminal which outputs a second voltage, a first input terminal, a second input terminal, a third input terminal, and a fourth input terminal, a first output terminal and a second output terminal, a first switch element connected between the first voltage terminal and the first input terminal, and which performs an open/close operation corresponding to the external signal, a second switch element connected between the first voltage terminal and the second input terminal, and which performs an open/close operation corresponding to the external signal, a third switch element connected between the second voltage terminal and the third input terminal, and which performs an open/close operation corresponding to the external signal, a fourth switch element connected between the second voltage terminal and the fourth input terminal, and which performs an open/close operation corresponding to the external signal, a fifth switch element connected between the first output terminal and the first input terminal, and which performs an open/close operation corresponding to the external signal, a sixth switch element connected between the first output terminal and the second input terminal, and which performs an open/close operation corresponding to the external signal, a seventh switch element connected between the second output terminal and the third input terminal, and which performs an open/close operation corresponding to the external signal, and an eighth switch element connected between the second output terminal and the fourth input terminal, and which performs an open/close operation corresponding to the external signal, wherein one end of the above-mentioned first terminal pair of the magnetoelectric element is connected to the above-mentioned first input terminal, one end of the above-mentioned second terminal pair of the magnetoelectric element is connected to the above-mentioned second input terminal, the other end of the above-mentioned first terminal pair of the magnetoelectric element is connected to the above-mentioned third input terminal, and the other end of the above-mentioned second terminal pair of the magnetoelectric element is connected to the above-mentioned fourth input terminal.
In the above-mentioned magnetic sensor in accordance with the present invention from another aspect, the above-mentioned first, third, sixth and eighth switch elements close in the first period and the fourth period, while said second, fourth, fifth and seventh elements close during the second period and the third period.
Configuring the first switch part from eight switch elements, and interchanging the two sets of output terminal pair of the magnetoelectric element during the first period and the fourth period and during the second period and the third period. By such configuration, an offset signal component of the magnetoelectric element can be cancelled.
In the above-mentioned magnetic sensor in accordance with the present invention from another aspect, the above-mentioned magnetoelectric element is a Hall element.
In the above-mentioned magnetic sensor in accordance with the present invention from another aspect, the above-mentioned magnetoelectric element is a magnetic resistance element.
In the above-mentioned magnetic sensor in accordance with the present invention from another aspect, a signal generator which outputs a signal to the above-mentioned first switch part for determining the above-mentioned first, second, third and fourth period.
By using a Hall element or a magnetic resistance as a magnetoelectric element, a magnetic field sensor which is compact and suitable for integration can be achieved.
The novel features of the invention are set forth with particularity in the appended claims. The invention as to both structure and content, and other objects and features thereof will best be understood from the detailed description when considered in connection with the accompanying drawings.